<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>
const outer = {
    test:()=>console.log(this),
    inner: {
        regular: function() { console.log(this); },
        arrow: () => console.log(this)
    }
};
outer.test();//window
outer.inner.regular(); // 指向 inner 对象
outer.inner.arrow(); //window

</script>

</html>